package PO;

import java.io.Serializable;


public class UserPO implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int id;
	private String name;
	private String password;
	private UserRole role;
	private Boolean logined;
	private Boolean registered;
	private Department department;

	private UserPO(int I, String R, String p, UserRole r) {
		id = I;
		name = R;
		password = p;
		role = r;
		logined = false;
		registered = false;
	}

	public UserPO(int I, String R, String p, UserRole r, boolean l, boolean re) {
		id = I;
		name = R;
		password = p;
		role = r;
		registered = re;
		logined = l;
	}

	public UserPO(int I, String R, String p, UserRole r, boolean l, boolean re,
			Department d) {
		id = I;
		name = R;
		password = p;
		role = r;
		registered = re;
		logined = l;
		department = d;
	}

	public UserPO(int I, String p) {
		id = I;
		password = p;
	}

	public UserPO(int I) {
		this(I, null, null, null);
	}

	public void setPassword(String newPass) {

		this.password = newPass;
	}

	public String getName() {
		return (name);
	}

	public String getPassword() {
		return (password);
	}

	public int getID() {
		return (id);
	}

	public UserRole getUserRole() {
		return (role);
	}

	public boolean getLogin() {
		return (logined);
	}

	public boolean getRegister() {
		return (registered);
	}

	public void setRegistered() {
		// TODO Auto-generated method stub
		registered = true;
	}

	public Department getDep() {
		return department;

	}
}
